<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var day = 0;
        for (var i = 1; i <= 2020; i++) {
            for (var j = 1; j <= 12; j++) {
                if (i == 1 && j < 1 || i == 2020 && j > 2) {
                    continue;
                }
                var d = 31;
                if (j == 4 || j == 6 || j == 9 || j == 11) {
                    d = 30;
                } else if (j == 2) {
                    if (i % 4 == 0 && i % 100 != 0 || i % 400 == 0) {
                        d = 29;
                    } else {
                        d = 28;
                    }
                }
                for (var k = 1; k <= d; k++) {
                    if (i == 1 && j == 1 && k < 1 || i == 2020 && j == 2 && k > 6) {
                        continue;
                    }
                    
                    day++;

                }
            }
        }
        var m=day%7;
       
        alert("星期:"+m);




    </script>


</body>

</html>